<?
        $params[sid] = $sid;
        $params[action] = "editDescription";
        $url = "$baseURL/$webDIR/?".encode_params($params);

        if($errorMsg) echo "<center>$errorMsg<center>";
        $errorMsg = "";
        $rplans = list_reseller_plans($id,'array');
        

        if(is_array($rplans)){

                foreach($rplans as $plan){
	
                        echo "<form action='$url' method='POST'>";
                        echo "<TABLE border=1 class='bTable' cellspacing='0'>";
			echo "<tr><th colspan='2'>$plan[plan]</th><tr>";
			echo "<input type='hidden' name='plan' value='$plan[plan]'>";

                	$splans = list_plan_details($plan[plan],'array');
			$d = explode("|",$splans[0][description]);
			$selecta = "<option value=''></option>";
			foreach($d as $dd){
				$selecta .= "<option value='$dd'>$dd</option>";
			}
			$rd = explode("|",$plan[d]);
			for($i=0;$i<15;$i++){
			        $sel = str_replace("'$rd[$i]'","'$rd[$i]' selected",$selecta);    
				echo "<tr>
					<td>".($i+1)."</td>
					<td>
						<select name='sel[$i]'>
							$sel;
						</select>
					</td>
				</tr>
				";
			}
                        echo "
                                        <tr>
                                                <td colspan='2' align='center'>
                                                        <input type='submit'  value='Save settings'>
                                                       
                                                </td>
                                        </tr>
                        ";

			echo "</table>";
			echo "</form>";
		
		}
        }
?>



